import Login from '@/views/account/Login.vue'
import BiLogin from '@/views/account/BiLogin.vue'
import LoginStore from '@/views/account/LoginStore.vue'
import Lost from '@/views/lost/Index.vue'

import openRoutes from '@/router/mainRoutes/open.js'
import bookRoutes from '@/router/mainRoutes/book.js'
import queueRoutes from '@/router/mainRoutes/queue.js'
import saveRoutes from '@/router/mainRoutes/save.js'
import takeRoutes from '@/router/mainRoutes/take.js'
import recycleRoutes from '@/router/mainRoutes/recycle.js'
import signRoutes from '@/router/mainRoutes/sign.js'

import onproductRoutes from '@/router/mainRoutes/onproduct.js'
import statisticsRoutes from '@/router/mainRoutes/statistics.js'
import rankRoutes from '@/router/mainRoutes/rank.js'
import performanceRoutes from '@/router/mainRoutes/performance.js'
import onwineRoutes from '@/router/mainRoutes/onwine.js'
import onmemberRoutes from '@/router/mainRoutes/onmember.js'
import onqueueRoutes from '@/router/mainRoutes/onqueue.js'
import abnormalRoutes from '@/router/mainRoutes/abnormal.js'
import collectRoutes from '@/router/mainRoutes/collect.js'
import sendRoutes from '@/router/mainRoutes/send.js'
import changeRoutes from '@/router/mainRoutes/change.js'

import workbenchRoutes from '@/router/mainRoutes/workbench.js'

//动态路由配置表
export const MainRoutes = [
    ...openRoutes,
    ...bookRoutes,
    ...queueRoutes,
    ...saveRoutes,
    ...takeRoutes,
    ...recycleRoutes,
    ...signRoutes,
    ...onproductRoutes,
    ...statisticsRoutes,
    ...rankRoutes,
    ...performanceRoutes,
    ...onwineRoutes,
    ...onmemberRoutes,
    ...onqueueRoutes,
    ...abnormalRoutes,
    ...collectRoutes,
    ...workbenchRoutes,
    ...sendRoutes,
    ...changeRoutes,
]

//系统路由
export const SystemRoutes = [
    // 登录
    {
        path: '/login',
        name: 'Login',
        component: Login,
        meta: {
            title: '登录'
        }
    },
    // bi登录
    {
        path: '/bilogin',
        name: 'BiLogin',
        component: BiLogin,
        meta: {
            title: 'BI经营管理'
        }
    },
    // 登录门店
    {
        path: '/login/store',
        name: 'LoginStore',
        component: LoginStore,
        meta: {
            title: '选择店铺'
        }
    },
    // 首页（工作台）
    {
        path: '/',
        redirect: '/workbench',
        children: MainRoutes
    },
    //页面丢失
    {
        path: '/lost',
        name: 'Lost',
        component: Lost,
        meta: {
            title: '404'
        }
    },
    // 重定向跳转404
    {
        path: "/:pathMatch(.*)*",
        component: Lost,
        meta: {
            title: '404'
        }
    },
]
